﻿using System;
using System.IO;
using System.Windows.Forms;

namespace SopCastRecorder
{
	public class ScheduleInfo
	{
		public bool Enable { get; set; }
		public string Path { get; set; }
		public string Channel { get; set; }
		public DateTime Date { get; set; }
		public DateTime StartTime { get; set; }
		public DateTime EndTime { get; set; }
		public bool WeekSun { get; set; }
		public bool WeekMon { get; set; }
		public bool WeekTue { get; set; }
		public bool WeekWed { get; set; }
		public bool WeekThu { get; set; }
		public bool WeekFri { get; set; }
		public bool WeekSat { get; set; }
		public ScheduleInfo()
		{
			this.Enable = true;
			var now = DateTime.Now;
			this.Date = now;
			this.StartTime = now;
			this.EndTime = now;
		}
		public string GetInputPath()
		{
			string fileName;
			if (!string.IsNullOrEmpty(this.Path))
			{
				fileName = this.Path;
			}
			else
			{
				fileName = Application.StartupPath + "\\";
			}
			return
				fileName +
				DateTime.Now.ToString(OptionFile.Option1.FileNameFormat) +
				OptionFile.Option1.Extention;
		}
	}
}
